<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>钱包盒子-首页</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.css" />
		<link rel="stylesheet" href="../css/public.css" />
		<link rel="stylesheet" href="../css/main.css" />
	</head>

	<body>
		<div class="mui-content mui-scroll-wrapper">
			<div class="mui-scroll">

				<div id="slider" class="mui-slider">
					<div class="mui-slider-group mui-slider-loop">
						<!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
						<div class="mui-slider-item mui-slider-item-duplicate">
							<a href="#">
								<img src="../img/img-slider1.png">
							</a>
						</div>
						<!-- 第一张 -->
						<div class="mui-slider-item">
							<a href="#">
								<img src="../img/img-slider1.png">
							</a>
						</div>
						<!-- 第二张 -->
						<div class="mui-slider-item">
							<a href="#">
								<img src="../img/img-slider1.png">
							</a>
						</div>
						<!-- 第三张 -->
						<div class="mui-slider-item">
							<a href="#">
								<img src="../img/img-slider1.png">
							</a>
						</div>
						<!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
						<div class="mui-slider-item mui-slider-item-duplicate">
							<a href="#">
								<img src="../img/img-slider1.png">
							</a>
						</div>
					</div>
					<div class="mui-slider-indicator">
						<div class="mui-indicator mui-active"></div>
						<div class="mui-indicator"></div>
						<div class="mui-indicator"></div>
					</div>
				</div>

				<div class="main-top"><span class="num">15680</span>人提交了借款申请</div>

				<div class="main-nav">
					<ul id="fnNav" class="fn-nav clearfix">
						
					</ul>
				</div>

				<div class="ad-box">
					<a href="javascript:void(0);"><img width="100%" src="../img/img-ad1.png" /></a>
				</div>

				<div class="main-box">
					<div class="title">我要消费</div>
					<div class="ad-box">
						<a href="javascript:void(0);"><img width="100%" src="../img/img-ad2.png" /></a>
					</div>
				</div>

				<div class="main-box2 mb10">
					<div class="title">精选服务</div>
					<ul class="service-nav2 clearfix">
						<li>
							<a class="service-nav-item" href="internet_traffic.html" name="internet_traffic">
								<img class="img" src="../img/icon-service1.png">
								<div class="tit">互联网金融</div>
								<p class="text">流量用户批发</p>
							</a>
						</li>
						<li>
							<a class="service-nav-item" href="calculator.html" name="calculator">
								<img class="img" src="../img/icon-service2.png">
								<div class="tit">利息计算器</div>
								<p class="text">算一算付多少</p>
							</a>
						</li>
						<li>
							<a class="service-nav-item" href="license.html" name="license">
								<img class="img" src="../img/icon-service3.png">
								<div class="tit">金融牌照</div>
								<p class="text">代售代买合作</p>
							</a>
						</li>
					</ul>
				</div>

			</div>
		</div>
	</body>
	<script src="../js/mui.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/common.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript" charset="utf-8">
		mui.init({
			swipeBack: true //启用右滑关闭功能
		});

		mui('.mui-scroll-wrapper').scroll({
			deceleration: 0.0005
		});

		mui.plusReady(function() {
			init();
		});
		
		function init(){
			mui.getJSON('http://dk.9ok.xin/qbhz_app.json', function(data){
				var html = '';
				mui.each(data,function(key,item){
					if(item.status == 1){
						var href = item.href == '' ? 'javascript:void(0);' : item.href;
						var name = item.name == '' ? '' : ('name="'+item.href+'"');
						var flag = '';
						if(item.flag){
							flag = ' flag="'+item.flag+'"';
						}
						html += '<li>'+
									'<a href="'+ href +'" '+ name + flag + '>'+
										'<img class="iconfont" src="'+ item.img_path +'" />'+
										'<p class="text mui-ellipsis">'+ item.icon_name +'</p>'+
									'</a>'+
								'</li>';
					}
				});
				if(html != '') {
					document.getElementById("fnNav").innerHTML = html;
				}
			});
		}

		mui(".main-nav").on('tap', 'li a', function() {
			var href = this.getAttribute("href");
			var name = this.getAttribute("name");
			var flag = this.getAttribute("flag");
			if(flag){
				mui.openWindow({
					url: href,
					id: name,
					extras: {
						flag: flag
					}
				});
			}else{
				mui.openWindow({
					url: href,
					id: name
				});
			}
		});
		
		mui(".service-nav2").on('tap', 'li a', function() {
			var href = this.getAttribute("href");
			var name = this.getAttribute("name");
			mui.openWindow({
				url: href,
				id: name
			});
		});
	</script>

</html>